(function(window) {
    var app = {};
    app.env = {
        mainnet: {
            chainnet: 'mainnet',
            chainnetName: '主网',
            txhash: '96641620d37efb9b373d7e0e5949a88acbdded3bd25ad86fc313f374c40a89bd',
            dappAddress: 'n22neZJf89JVNLuAL7xrzvWT2ft4MfRi2KY',
            // to: 'n1J4FbJUoZGUwHV4MbSGS4G7LTZWg8XsemB',
            host: 'https://mainnet.nebulas.io',
            payApi: 'https://pay.nebulas.io/api/mainnet/pay'
        },
        testnet: {
            chainnet: 'testnet',
            chainnetName: '测试网',
            txhash: 'c0b9c21e813cecc06c7629fb04249facb32727b990241917e19fa07c6dcd536b',
            dappAddress: 'n1zmgvRKnG1gQiRVMP5TswFMwPmYiXW3LGJ',
            // to: 'n1FkSPeDDryyF5xnT1kZFwrdJ3geZY71dbe',
            host: 'https://testnet.nebulas.io',
            payApi: 'https://pay.nebulas.io/api/pay'
        }
    };
    app.chainnet = localStorage.getItem('chainnet') || 'mainnet';
    app.config = app.env[app.chainnet];

    window.app = app;
})(window);
